﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ModernChannel.Model.Interface;

namespace ModernChannel.Provider
{
    public class ProviderFactory : IProviderFactory
    {
        private IModernChannelProvider modernChannels = null;
        public IModernChannelProvider ModernChannels
        {
            get
            {
                if (modernChannels == null) modernChannels = new ModernChannelProvider();
                return modernChannels;
            }
        }

        private IProvinceProvider province = null;
        public IProvinceProvider Province
        {
            get
            {
                if (province == null) province = new ProvinceProvider();
                return province;
            }
        }
        private IRegionProvider region = null;
        public IRegionProvider Region
        {
            get
            {
                if (region == null)
                {
                    region = new RegionProvider();
                }
                return region;
            }
        }

        private IShopInfoProvider shopInfo = null;
        public IShopInfoProvider ShopInfo
        {
            get
            {
                if (shopInfo == null)
                {
                    shopInfo = new ShopInfoProvider();
                }
                return shopInfo;
            }
        }

        private IDistrictProvider district = null;
        public IDistrictProvider District
        {
            get
            {
                if (district == null) district = new DistrictProvider();
                return district;
            }
        }
        private IBilltoInfProvider billtoInf = null;
        public IBilltoInfProvider BilltoInf
        {
            get
            {
                if (billtoInf == null) billtoInf = new BilltoInfProvider();
                return billtoInf;
            }
        }
        private IShippingProvider shipping = null;
        public IShippingProvider Shipping
        {
            get
            {
                if (shipping == null) shipping = new ShippingProvider();
                return shipping;
            }
        }

        private IOrderProvider order = null;
        public IOrderProvider OrderInfo
        {
            get
            {
                if (order == null) order = new OrderProvider();
                return order;
            }
        }
        private ISerialNumberCdcHistProvider serialNumberCdcHist = null;
        public ISerialNumberCdcHistProvider SerialNumberCdcHist
        {
            get
            {
                if (serialNumberCdcHist == null) serialNumberCdcHist = new SerialNumberCdcHistProvider();
                return serialNumberCdcHist;
            }
        }

        private ISerialNumberRdcHistProvider serialNumberRdcHist = null;
        public ISerialNumberRdcHistProvider SerialNumberRdcHist
        {
            get
            {
                if (serialNumberRdcHist == null) serialNumberRdcHist = new SerialNumberRdcHistProvider();
                return serialNumberRdcHist;
            }
        }

        private IOrganization organization = null;
        public IOrganization Organization
        {
            get
            {
                if (organization == null)
                {
                    organization = new OrganizationProvider();
                }
                return organization;
            }
        }
        
        private IResponseSMSProvider responseSMS = null;
        public IResponseSMSProvider ResponseSMS
        {
            get
            {
                if (responseSMS == null) responseSMS = new ResponseSMSProvider();
                return responseSMS;
            }
        }

        private IAdhocDetailProvider adhocDetail = null;
        public IAdhocDetailProvider AdhocDetail
        {
            get
            {
                if (adhocDetail == null) adhocDetail = new AdhocDetailProvider();
                return adhocDetail;
            }
        }

        private IIncentiveAdhocProvider incentiveAdhoc = null;
        public IIncentiveAdhocProvider IncentiveAdhoc
        {
            get
            {
                if (incentiveAdhoc == null) incentiveAdhoc = new IncentiveAdhocProvider();
                return incentiveAdhoc;
            }
        }
    }
}
